
import request from '@/utils/request'

// 获取权限列表篇
export function getPermissionList(params) {
  return request({
    url:'/sys/permission',
    method: 'GET',
    params
  })
}
// 添加
export function addPermission(data) {
  return request ({
    url: '/sys/permission',
    method: 'POST',
    data
  })
}
// 删除权限点
export function delPermission(id) {
  return request ({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
// 根据id 获取权限点详情
export function getPermissionDetail(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'GET'
  })
}
// 更新接口
export function updatePermission(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'PUT'
  })
}